<h2>Księga gości - administracja</h2>

<?php echo $this->Paginator->prev('< Poprzednia', null, null, array('class' => 'disabled')); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->numbers(); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->next('Następna >', null, null, array('class' => 'disabled')); ?>
<?php

foreach($data as $elem) {
   
   echo("<div class=\"questbook-entry\"><p>".$elem['GuestbookEntry']['content']."</p></div>");
   if($elem['GuestbookEntry']['guest'] == '1') echo("<span class=\"entry-author\">".$elem['GuestbookEntry']['nickname']."</span>");
   else echo("<span class=\"entry-author\">".$this->Html->link($elem['GuestbookEntry']['nickname'], array('controller' => 'users', 'action' => 'profile', $elem['User']['id'], $elem['User']['username']))."</span>");

   echo("<span class=\"moderation\">".$this->Html->link("Usuń", array('action' => 'admin_delete', $elem['GuestbookEntry']['id']))."</span>");   
}
?>
<hr />
<?php echo $this->Paginator->prev('< Poprzednia', null, null, array('class' => 'disabled')); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->numbers(); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->next('Następna >', null, null, array('class' => 'disabled')); ?>